class TaskStatusHistory < ActiveRecord::Base

  belongs_to :task
  validates_presence_of :description, :if => :should_validate_description?

  def should_validate_description?
    # When the status is changed to "In Revision" the description cannot be blank.
    if changed_to.eql?("In Revision")
      description.blank?
    end
  end
end